import { createBrowserRouter } from 'react-router-dom'

import Home from '../props/home/Index'
import Login from '../props/login/Index'
import Xq from '../props/xq/Index'
const routers = createBrowserRouter([
    { index: true, element: <Home></Home> },
    {
        path: '/home',
        lazy: async () => {
            const { default: Home } = await import('../props/home/Index')
            return {
                element: <Home></Home>
            }
        }
    },
    {
        path: '/login',
        element: <Login></Login>
    },
    {
        path: '/xq:id',
        lazy: async () => {
            const { default: Xq, loader } = await import('../props/xq/Index')
            return {
                element: <Xq></Xq>,
                loader
            }
        }
    }
])
export default routers